/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.elicitor.core;

import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Insets;
import java.awt.Point;
import java.awt.geom.Line2D;
import java.awt.geom.Point2D;
import java.util.Random;

import javax.swing.JFrame;
import javax.swing.JPanel;
/**
 *
 * @author dileepa
 */
public class Graphihcs extends JPanel {

    Double basicValues[];
    
    public Graphihcs(Double[] basicValues) {
        
        this. basicValues = basicValues;
        
    }
    

    @Override
  public void paintComponent(Graphics g) {
      super.paintComponent(g);

      Graphics2D g2d = (Graphics2D) g;

      g2d.setColor(Color.blue);
      g2d.scale(10, 10);
      

      Dimension size = getSize();
//      Insets insets = getInsets();
//
//      int w =  size.width - insets.left - insets.right;
//      int h =  size.height - insets.top - insets.bottom;
      
      
     
      for (double d : basicValues){
          
          d = d/200000.0;
          Point2D.Double p = new Point2D.Double(d, 10.0);
          Line2D.Float line = new Line2D.Float(p,p);
          g2d.draw(line);
      }
      
      
      
      
  }
public static void main(String[] args) {
      JFrame frame = new JFrame("Points");
      frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
//      frame.add(new Graphihcs(basicValues));
      frame.setSize(250, 200);
      frame.setLocationRelativeTo(null);
      frame.setVisible(true);
    }
  
}
    

